package destination8089.service.impl;

import destination8089.entity.param.DestinationAddParam;
import destination8089.entity.po.Destination;
import destination8089.mapper.DestinationMapper;
import destination8089.service.DestinationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ttxxi
 * @since 2022-05-31
 */
@Service
public class DestinationServiceImpl extends ServiceImpl<DestinationMapper, Destination> implements DestinationService {
    @Resource
    DestinationMapper destinationMapper;

    @Override
    public Boolean addDestination(DestinationAddParam param) {
        Destination destination = new Destination();
        destination.setDestination(param.getDestination());
        int insert = destinationMapper.insert(destination);
        return insert == 1;
    }

}
